<template>
	<view class="container">
		<view class="count">
			<view class="count_dl">
				<view class="count_dt"><text>{{num}}</text>人</view>
				<view class="count_dd">已成功邀请</view>
			</view>
			<view class="count_dl">
				<view class="count_dt"><text>{{jifen}}</text>积分</view>
				<view class="count_dd">已获得奖励</view>
			</view>
		</view>
		<view class="ctitle">奖励明细</view>
		<view class="clist">

			<view class="clist_dl" v-for="(item,index) in rows" :key="item.id">
				<view class="clist_dt">
					<view class="clist_name">{{item.name}}</view>
					<view class="clist_time">完成时间：{{item.time}}</view>
				</view>
				<view class="clist_num">+{{item.point}}</view>
			</view>


		</view>
	</view>
</template>

<script>
	import API from "@/common/api.js";
	export default {
		data() {
			return {
				num: 0,
				jifen: 0,
				rows: []
			}
		},
		onLoad() {
			var $this = this
			API.post("user/myinvitelog").then((res) => {
				if (res.code == 1) {
					$this.num = res.data.num
					$this.jifen = res.data.jifen
					$this.rows = res.data.rows
				}
			})
		},
		methods: {

		}
	}
</script>

<style lang="scss">
	page {
		background: #f7f7f7;
	}

	.count {
		background: linear-gradient(to right, #47c0fa, #3c8ffb);
		color: #fff;
		border-radius: 20rpx;
		margin: 30rpx;
		display: flex;
		text-align: center;
		padding: 80rpx 0;
		overflow: hidden;
	}

	.count_dl {
		flex: 1;
	}

	.count_dt {
		font-size: 36rpx;
	}

	.count_dt text {
		font-size: 60rpx;
		font-weight: bold;
	}

	.count_dd {
		font-size: 28rpx;
		margin-top: 10rpx;
	}

	.ctitle {
		font-size: 36rpx;
		font-weight: bold;
		padding-left: 24rpx;
		position: relative;
		margin: 0 30rpx;
		overflow: hidden;
	}

	.ctitle::after {
		width: 10rpx;
		height: 32rpx;
		border-radius: 10rpx;
		background: $color;
		position: absolute;
		left: 0;
		top: 50%;
		transform: translateY(-50%);
	}

	.clist {
		width: 100%;
		overflow: hidden;
		padding: 30rpx;
		box-sizing: border-box;
	}

	.clist_dl {
		width: 100%;
		display: flex;
		justify-content: space-between;
		align-items: center;
		background: #fff;
		margin-bottom: 24rpx;
		border-radius: 20rpx;
		padding: 30rpx;
		box-sizing: border-box;
	}

	.clist_dt {
		flex: 1;
	}

	.clist_name {
		font-size: 30rpx;
	}

	.clist_time {
		margin-top: 16rpx;
		color: #888;
	}

	.clist_num {
		font-size: 36rpx;
		font-weight: bold;
		color: $color;
	}
</style>